//
//  Runable.swift
//  面向协议编程
//
//  Created by 我演示 on 2019/11/5.
//  Copyright © 2019 ALLSall. All rights reserved.
//

import Foundation
import UIKit

protocol Runable {
    
}

extension Runable where Self : UIViewController {
    func run() {
        print("正在吃东西")
    }
    
    func strat () {
        
    }
    func stop() {
        
        for layer  in view.layer.sublayers! {
            if layer.isKind(of: CAEmitterLayer.self) {
                layer.removeFromSuperlayer()
            }
        }
    }
}
